/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DAO;

import java.sql.ResultSet;

/**
 *
 * @author tran tuan tai
 */
public class WSPageDAO
{
    public String GetPageContent(int id)
    {
        String query = "SELECT CONTENT FROM PAGE WHERE PAGEID = " + id;
        try
        {
            ResultSet rs =  WebstoreAcess.ExecuteQuery(query);

            rs.beforeFirst();

            while(rs.next())
            {
                return rs.getString(1);
            }
            rs.close();
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }

        return null;
    }
}
